package com.sluggard.security.manage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sluggard.security.manage.mapper.RoleMenuMapper;
import com.sluggard.security.manage.model.entity.RoleMenuEntity;
import com.sluggard.security.manage.service.IRoleMenuService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 角色菜单关联 服务实现类
 * </p>
 *
 * @author lizheng
 * @since 2024-04-28
 */
@Service
public class RoleMenuServiceImpl extends ServiceImpl<RoleMenuMapper, RoleMenuEntity> implements IRoleMenuService {

    @Override
    public List<Long> selectByRoleId(Long roleId) {
        return baseMapper.selectMenusByRoleId(roleId);
    }

    @Override
    public void deleteByRoleId(Long id) {
        baseMapper.deleteByRoleId(id);
    }
}
